
const data_config = require("./data_config");


module.exports = {
  nav_name: '异常管理',          //生成导航菜单
  module_name: 'abnormal_m',     //生成路径，必须与文件名相同
  //接口
  api: `{
      page: commonPath + "/admin/abnormal_record/page",          //分页    
      edit: commonPath + '/admin/abnormal_record/edit',          //编辑    
      accountBalanceAnomalyDetection: commonPath + '/admin/abnormal_record/accountBalanceAnomalyDetection',       //账户金额异常检测
      noSettlementAnomalyDetection: commonPath + "/admin/abnormal_record/noSettlementAnomalyDetection",           //未结算异常检测        
      settlementRecordAnomalyDetection: commonPath + '/admin/abnormal_record/settlementRecordAnomalyDetection',   //结算记录异常检测                   
  }`, 
  //列表
  table: {
    //isGenerate: "false",                 //false表示不生成页面
    table_name: "abnormal_m_table",        //表页面名
    nav_name: "异常管理",                  //导航名
    tipsText: "异常管理 >> 异常列表",    //顶部文字
    // tableReqMethod: "get",  //分页请求配置成get方式, 默认为post
    // pageApi: "API.sys_setting.sys_setting_page",  //请求api
    // extraPageRequestParams: `
    //   courseId: this.$route.query.id,  //请求
    // `, //已有page和pageSize
    //配置列表页面
    tableData: [
      //类型normal(title定义名称  name定义动态绑定值  type定义类型  itemWidth定义宽度)
      { title: '序号', name: 'index', type: "normal",itemWidth: "60" },     
      {
          title: '类型',
          name: 'type',
          type: "opts",
          showName: "typeShow",
          showObj: `{
            "1": "未结算",
            "2": "账户金额异常",
            "3": "已标识结算,但没有收益明细",
          }`
      },
      {
          title: '状态',
          name: 'state',
          type: "opts",
          showName: "stateShow",
          showObj: `{
            "1": "待处理",
            "2": "待验证",
            "3": "已解决",
          }`
      },
      { title: '备注', name: 'remark', type: "normal" },
      { title: '创建时间', name: 'gmtCreated', type: "normal" },
      
    ],

    //配置列表操作项(type类型  text名称  request是否请求  jump跳转路由【本文件名+跳转文件名】 url接口 requestType请求方式)
    tableOpt: [    
        {
          type: "changeState",
          text: "已处理",
          request: true,
          url: "API.abnormal_m.edit",
          requestType: 'post',
          params: `{id,  state: 3 }`, //必须为文本 状态 
          methodNameTag: 'Processed', //方法衔接拓展名 changeState Black
          showCondition: `scope.row.state == 1`,  //展示条件，没有就不传或置为空
        },
        {
          type: "changeState",
          text: "已验证",
          request: true,
          url: "API.abnormal_m.edit",
          requestType: 'post',
          params: `{id,  state: 3 }`, //必须为文本
          methodNameTag: 'Verified', //方法衔接拓展名 changeState Black
          showCondition: `scope.row.state == 2`,  //展示条件，没有就不传或置为空
        },      
        
    ],
     
    //配置搜索栏
    search: {
        //筛选
        contentArr: {
            //selectOptsName自定义名称  selectOptsArr下拉内容  labelWidth定义宽度
            select1: {
                labelName: '状态',
                inputName: 'state',
                selectOptsName: "stateOpts",
                selectOptsArr: `[
                  { value: "", label: "全部" },
                  { value: "1", label: "待处理" },
                  { value: "2", label: "待验证" },
                  { value: "3", label: "已解决" },
                ],
                `, 
            },
            select2: {
                // labelWidth: "120",
                labelName: '类型',
                inputName: 'type', 
                selectOptsName: "typeOpts",
                selectOptsArr: `[
                    { value: "", label: "全部" },
                    { value: "1", label: "未结算" },
                    { value: "2", label: "账户金额异常" },
                    { value: "3", label: "已标识结算,但没有收益明细" },
                ],
                `, 
            },
           
            
        },
        //查找按钮的文字
        searchBtn: {
            //链接与table请求接口相同，不做另外配置
            text: "查询",   
        },
        //添加按钮
        // addBtn: {
        //     //(type类型  text名称  request是否请求  jump跳转路由【本文件名+跳转文件名】)
        //     type: "add",
        //     text: "新增",
        //     request: false,
        //     jump: "/abnormal_m_add_abnormal", 
        // }
    },
  },




}

